package com.github.leecho.spring.cloud.gateway.dubbo.client;

import com.github.leecho.spring.cloud.gateway.dubbo.route.DubboRoute.DubboProvider;
import org.apache.dubbo.config.spring.ReferenceBean;
import org.apache.dubbo.rpc.service.GenericService;

/**
 * @author LIQIU
 * @date 2021/7/1 15:27
 */
public interface DubboGenericServiceCache {

	/**
	 * 通过dubbo接口
	 * @param dubboProvider dubbo接口
	 * @return Dubbo ReferenceBean
	 */
	ReferenceBean<GenericService> get(DubboProvider dubboProvider);

	/**
	 * 缓存Dubbo ReferenceBean
	 * @param dubboProvider dubbo接口
	 * @param referenceBean Dubbo ReferenceBean
	 * @return Dubbo ReferenceBean
	 */
	ReferenceBean<GenericService> put(DubboProvider dubboProvider, ReferenceBean<GenericService> referenceBean);

}
